import http from "@/utils/http";
/**
 * 广告区域(pc-小程序)
 * @param {Number} distributionSite 要获取 首页的数据-1 还是 分类页面的数据-2
 * @returns Object
 */

export const getHomeBanner = (distributionSite = 1) => {
    return http({
        url: '/home/banner',
        data: distributionSite
    })
}

/* 
首页-前台类目-小程序
*/
export function getHomeCategoryHeadMutli() {
    return http({
        url: '/home/category/head/mutli'
    })
}

/* 
首页-人气推荐-小程序和app
*/
export function getHomeHotMutli() {
    return http({
        url: '/home/hot/mutli'
    })
}

/* 
新鲜好物
*/
export const getHomeNew = (limit = 4) => {
    return http({
        url: '/home/new',
        data: { limit }
    })
}

/* 
猜你喜欢
*/
export const getHomeGoodsGuessLike = (data = {}) => {
    return http({
        url: '/home/goods/guessLike',
        data,
    })
}

/* 
推荐模块
*/
export const getRecommend = (url, data = {}) => {
    return http({
        url,
        data,
    })
}